package cn.lbd.api.designMode.prototype;

import javax.xml.crypto.Data;
import java.util.Date;

public class Bilibili {
    public static void main(String[] args) throws CloneNotSupportedException {
        //原创
        Date date=new Date();
        Video v1=new Video("灯",date);
        Video v2 = (Video) v1.clone();
        System.out.println("v1=>"+v1);
        System.out.println("v2=>"+v2);
        date.setTime(2222222);
        System.out.println("==========================");
        System.out.println("v1=>"+v1);
        System.out.println("v2=>"+v2);
        //System.out.println("v1.hash=>"+v1.hashCode());

        /*//无良up主
        Video v2 = (Video) v1.clone();
        System.out.println("v2=>"+v2);
        System.out.println("v2.hash=>"+v2.hashCode());
        v2.setName("clone");
        System.out.println(v2);*/
    }
}
